package yxy.game.pm2.active.module.openservicerank;

import org.joda.time.DateTimeConstants;
import yxy.game.pm2.bean.timeline.FutureRunnable;

/**
 * <p>开服冲榜</>
 * @ClassName OpenServiceRushFuture
 * @Author jingtao-zheng
 * @Date 2022/7/8 17:46
 * @Version 1.0
 **/
public class OpenServiceRushFuture extends FutureRunnable {
    @Override
    public void init() {
        handle();
    }

    @Override
    public void tick() {
        handle();
    }

    @Override
    public long period() {
        return DateTimeConstants.MILLIS_PER_MINUTE * 10;// 10分钟一刷
    }

    private void handle() {
        try {
            OpenServiceHeroRushFutureHandle openServiceHeroRushFutureHandle = new OpenServiceHeroRushFutureHandle();
            openServiceHeroRushFutureHandle.heroupdate();
            openServiceHeroRushFutureHandle.areanupdate();
            openServiceHeroRushFutureHandle.levelupdate();
            openServiceHeroRushFutureHandle.boosupdate();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
